#ifndef COMMON_H
#define COMMON_H

#include "style.h"
#include "QsLog.h"
#include <QDebug>

#define mylog qDebug() << "file:" << __FILE__ << "line:" << __LINE__

using namespace QsLogging;
#define SOFTWARE_NAME       ("Scheduling")
//#define LOGLEVEL                    (QsLogging::TraceLevel)
//#define LOGLEVEL                    (QsLogging::DebugLevel)
#define LOGLEVEL                    (QsLogging::InfoLevel)
#define WINDOW_WIDTH        (1050)
#define WINDOW_HEIGHT       (WINDOW_WIDTH * 0.618)

#define STACKWIDGET_WELCOME_INDEX (0)                                 // widgetArray 中 欢迎 页面的索引值
#define STACKWIDGET_MEMBERSCHEDULE_INDEX (1)                 // widgetArray 中 人员排班 页面的索引值
#define STACKWIDGET_DATE_INDEX (2)                                          // widgetArray 中 日期 页面的索引值
#define STACKWIDGET_SCHEDULE_INDEX (3)                                 // widgetArray 中 排班 页面的索引值
#define MAX_STACKWIDGET_PAGE_COUNT (4)                                           // widgetArray 中最大指针数量

#ifdef REQUIREMENT_ENABLE
// memberschedule.cpp 中tablewidget各列的含义
#define COLUMN_NAME                                                         (0)
#define COLUMN_ABILITY_LEVEL                                        (1)
#define COLUMN_REQUIREMENT                                         (2)
#define COLUMN_TEACHER                                                  (3)
#define COLUMN_PUSHBUTTON_DELETE                           (4)
#define COLUMN_PUSHBUTTON_TEACHER_DELETE        (5)
#else
// memberschedule.cpp 中tablewidget各列的含义
#define COLUMN_NAME                                                         (0)
#define COLUMN_ABILITY_LEVEL                                        (1)
#define COLUMN_TEACHER                                                  (2)
#define COLUMN_PUSHBUTTON_DELETE                           (3)
#define COLUMN_PUSHBUTTON_TEACHER_DELETE        (4)
#endif  // REQUIREMENT_ENABLE


#define  MEMBER_ABILITY_LEVEL_1    0    // 培训期 能力值1
#define  MEMBER_ABILITY_LEVEL_4    1    // 骨干     能力值8-10
#define  MEMBER_ABILITY_LEVEL_COUNT (MEMBER_ABILITY_LEVEL_4 + 1)  // MEMBER_ABILITY_LEVEL_* 能力分级总数

//// memberschedule.cpp 中tablewidget 夜班数量 combobox下拉索引值
//#define MEMBER_NIGHT_COUNT_LESS            (0)
//#define MEMBER_NIGHT_COUNT_DEFAULT     (1)
//#define MEMBER_NIGHT_COUNT_MORE           (2)

// memberschedule.cpp 中tablewidget 特殊选项 combobox下拉索引值
#define MEMBER_REQUIREMENT_NONE                                       (0)
#define MEMBER_REQUIREMENT_NOHOLIDAY                            (1)

// dateset.cpp中各个日期的类型
#define DATESET_WORKDAY                 (0)
#define DATESET_HOLIDAY                   (1)
#define DATESET_WORKDAY_AND_SPECIFYDAY           (2)
#define DATESET_HOLIDAY_AND_SPECIFYDAY             (3)

// dateset.cpp中右键菜单设置本日上班/非上班人员
#define DATESET_NONE                          (0)
#define DATESET_DAYWORK                 (1)
#define DATESET_NIGHTWORK             (2)
#define DATESET_NODAYWORK            (3)
#define DATESET_NONIGHTWORK        (4)

extern int CURRENT_YEAR; //  选择的年    导出时用
extern int CURRENT_MONTH; // 选择的月    导出时用

#endif // COMMON_H
